﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common.Infrastructure.Persistence.Repositories;
using NHibernate;
using Products.Domain.Products;
using System.Linq;

namespace Products.Infrastructure.Persistence.Products
{
    public class NHibernateProductRepository : GenericCrudRepository<Produce>, IProductRepository
    {
        public NHibernateProductRepository(ISession session) : base(session) { }

        public IEnumerable<Produce> GetAllProduces()
        {
            return Session.QueryOver<Produce>().List();
        }
    }
}
